package entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 质量标准表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "质量标准表")
public class QualityStandard implements Serializable {

    @Schema(description = "标准ID")
    private Integer standardId;

    @Schema(description = "标准类型（原料/半成品/成品）")
    private String standardType;

    @Schema(description = "检测项目")
    private String itemName;

    @Schema(description = "创建者ID")
    private Integer creatorId;

    @Schema(description = "质检次数（首检/复检）")
    private String inspectionCount;

    @Schema(description = "标准值")
    private BigDecimal standard;

    @Schema(description = "下限值")
    private BigDecimal lowerBound;

    @Schema(description = "上限值")
    private BigDecimal upperBound;

    @Schema(description = "单位")
    private String unit;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime updateTime;

    @Schema(description = "状态")
    private String standardStatus;

    @Schema(description = "标准名")
    private String standardName;
}